<?php

/**
 * myMemberAppointment form.
 *
 * @package    docplus.co.za
 * @subpackage form
 * @author     Fox Matuku
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class myMemberAppointmentForm extends BaseAppointmentForm
{

    public function configure()
    {
        unset(
            $this['created_at'], $this['updated_at']
        );

        $this->widgetSchema['time_slot_id'] = new sfWidgetFormInputHidden();
        $this->widgetSchema['doctor_id'] = new sfWidgetFormInputHidden();
        $this->widgetSchema['Member_id'] = new sfWidgetFormInputHidden();
        $this->widgetSchema['appointment_reason_id'] = new sfWidgetFormInputHidden();
        $this->widgetSchema['status'] = new sfWidgetFormInputHidden();
        $this->widgetSchema['note_by_doctor'] = new sfWidgetFormInputHidden();        
        $this->widgetSchema['has_reminder']->setLabel('Yes, I would thank to be reminded by an SMS on my mobile phone.');

        $this->validatorSchema['time_slot_id'] = new sfValidatorString(array("required" => true), array("required" => "The time slot is missing"));
        $this->validatorSchema['doctor_id'] = new sfValidatorString(array("required" => true), array("required" => "The doctor is missing"));
        $this->validatorSchema['Member_id'] = new sfValidatorString(array("required" => true), array("required" => "The Member is missing"));
        $this->validatorSchema['appointment_reason_id'] = new sfValidatorDoctrineChoice(array('required' => true, 'model' => 'AppointmentReason'), array('required' => 'Your *visit reason* is required.'));
        $this->validatorSchema['status'] = new sfValidatorString(array('required' => false));
        $this->validatorSchema['note_by_Member'] = new sfValidatorString(array('max_length' => 255, 'required' => false));
    }

}
